home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / appsrcs.zip / APPMORE.ZIP / APPDLGS.C < prev    next >
C/C++ Source or Header  |  1993-04-08  |  1KB  |  60 lines

  1. #define STRICT
  2. #include <windows.h>
  3. #include <windowsx.h>
  4. #include <shellapi.h>
  5. #include <stdio.h>
  6. #include <string.h>
  7. #include "appmore.h"
  8.  
  9. /*************************************************************************/
  10. /*  FUNCTION: SystemDlgProc                         */
  11. /*                                     */
  12. /*  Dialog for the SystemButtonBar                     */
  13. /*************************************************************************/
  14. BOOL WINAPI SystemDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
  15.     {
  16.     switch(message)
  17.     {
  18.     case WM_INITDIALOG:
  19.         return TRUE;
  20.  
  21.     case WM_COMMAND:
  22.        if(HIWORD(lParam) == BN_CLICKED)
  23.         {
  24.         switch(wParam)
  25.             {
  26.             case ID_CLOSE:
  27.             EndDialog(hDlg, TRUE);
  28.             SendMessage(hWndMain, WM_DESTROY, 0, 0);
  29.             break;
  30.  
  31.             case ID_MOVE:    // Changes the window style to size it
  32.             EndDialog(hDlg, TRUE);
  33.             bMoveButton = TRUE;
  34.             SendMessage(hWndMain, (UINT) WM_LBUTTONDOWN, wParam, lParam);
  35.             break;
  36.  
  37.             case ID_SETUP:
  38.             EndDialog(hDlg, TRUE);
  39.             ShellExecute(hWndMain, "open", "morsetup.exe", AppSystem.SectionName, NULL, SW_SHOWNORMAL);
  40.             break;
  41.  
  42.             case ID_QUICKLOAD:
  43.             bQuickLoad = !bQuickLoad;
  44.             if(!bQuickLoad)
  45.                 SetNormalChildCursor();
  46.             EndDialog(hDlg, TRUE);
  47.             InvalidateRect(hWndButton[0], NULL, FALSE);
  48.             UpdateWindow(hWndButton[0]);
  49.             return TRUE;
  50.  
  51.             case ID_CANCEL:
  52.             EndDialog(hDlg, 0);
  53.             return TRUE;
  54.             }
  55.         }
  56.        break; /* end WM_COMMAND */
  57.     }
  58.     return FALSE;
  59.     } /* end DlgSysProc */
  60.